<div class="modal fade bs-example-modal-lg" id="modify" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">&times;</button>
                <h4 class="modal-title">药品</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal form-bordered">
                    <input type="hidden" placeholder="药品uuid" class="form-control" ng-model="request.response.uuid">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">名称</label>
                        <div class="col-sm-10">
                            <input type="text" placeholder="药品名称" class="form-control" ng-model="request.response.name">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">生产厂家</label>
                        <div class="col-sm-8">
                            <!--<div class="checkbox block">-->
                            <!--<label><input type="checkbox"> Unchecked</label>-->
                            <!--</div>-->
                            <!--<input type="checkbox" value="true" id="checkboxPrimary" ng-model="request.response.newProducer">-->
                            <div class="checkbox block">
                                <div class="ckbox ckbox-primary">
                                    <input type="checkbox" value="true" id="checkboxPrimary"
                                           ng-model="request.response.newProducer">
                                    <label for="checkboxPrimary" style="margin-left: 10px;">系统中无此厂家,添加新厂家</label>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="form-group" ng-hide="request.response.newProducer">
                        <label class="col-sm-2 control-label">已有厂家</label>
                        <div class="col-sm-10">
                            <input type="hidden" placeholder="厂家uuid" class="form-control"
                                   ng-model="request.response.producer.uuid">
                            <select class="form-control mb15" ng-model="request.response.producer.uuid"
                                    ng-options="produ.uuid as produ.name for produ in request.response.producerList">
                            </select>
                        </div>
                    </div>
                    <div class="form-group" ng-show="request.response.newProducer">
                        <label class="col-sm-2 control-label">新厂家</label>
                        <div class="col-sm-4">
                            <input type="text" placeholder="厂家名称" class="form-control"
                                   ng-model="request.response.producer.name">
                        </div>
                        <div class="col-sm-6">
                            <input type="text" placeholder="厂家地址" class="form-control"
                                   ng-model="request.response.producer.address">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="well row row-pad-5" ng-repeat="spec in request.response.specList track by $index">
                            <div class="col-sm-6">
                                <input type="text" placeholder="规格名称" class="form-control" ng-model="spec.name">
                            </div>
                            <div class="col-sm-6">
                                <input type="text" placeholder="规格编码" class="form-control" ng-model="spec.code">
                            </div>
                            <div class="col-sm-3">
                                <input type="text" placeholder="规格进价" min="0" class="form-control"
                                       ng-model="spec.inPrice">
                            </div>
                            <div class="col-sm-3">
                                <input type="text" placeholder="规格售价" min="0" class="form-control"
                                       ng-model="spec.outPrice">
                            </div>
                            <div class="col-sm-2">
                                <input type="number" placeholder="规格库存" min="0" class="form-control"
                                       ng-model="spec.count">
                            </div>
                            <div class="col-sm-3">
                                <button type="button" class="btn btn-sm btn-danger" ng-click="deleteSpec($index)"
                                        ng-show="$last">
                                    <span class="glyphicon glyphicon-remove"></span>删除
                                </button>
                                <button type="button" class="btn btn-sm btn-primary" ng-click="addSpec()"
                                        ng-show="$last">
                                    <span class="glyphicon glyphicon-plus"></span>添加规格
                                </button>
                            </div>

                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12 control-label">
                            <button type="button" class="btn btn-primary" ng-click="submitForm()">
                                保存
                            </button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>


